package com.jumper.property.comparer.core;

import com.jumper.property.comparer.core.diff.DefaultDiffResolver;
import com.jumper.property.comparer.core.diff.DiffResolver;
import com.jumper.property.comparer.core.result.DiffResult;

public class DiffUtil {

    private static final DiffResolver RESOLVER = new DefaultDiffResolver();

    /**
     * 获取差异串，如果为null则没有修改
     */
    public static DiffResult resolve(Class<?> cls, Object beforeValue, Object afterValue) {
        return RESOLVER.getDifference(cls, beforeValue, afterValue);
    }
}
